//
//  SeasonObject.m
//  ArandaTest
//
//  Created by Camilo Cadena on 2/18/15.
//  Copyright (c) 2015 Camilo Cadena. All rights reserved.
//

#import "SeasonObject.h"

@implementation SeasonObject

@synthesize  air_date;
@synthesize  episode_count;
@synthesize  season_id;
@synthesize  poster_path;
@synthesize  season_number;

+ (SeasonObject *)instanceFromDictionary:(NSDictionary *)aDictionary{
    SeasonObject *instance = [[SeasonObject alloc] init];
    [instance setAttributesFromDictionary:aDictionary];
    return instance;
}

- (void)setAttributesFromDictionary:(NSDictionary *)aDictionary {
    
    if (![aDictionary isKindOfClass:[NSDictionary class]]) {
        return;
    }
    
    [self setValuesForKeysWithDictionary:aDictionary];
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    
    if ([key isEqualToString:@"id"]) {
        [self setValue:value forKey:@"season_id"];
    }
    
}

@end
